$OpenBSD: patch-browse_c,v 1.1 2002/08/10 01:14:04 naddy Exp $
--- browse.c.orig	Sat Sep 22 00:54:13 2001
+++ browse.c	Tue Oct 16 18:14:04 2001
@@ -87,6 +87,12 @@ HANDLER (browse)
     }
     ASSERT (validate_user (user));
 
+    if (sender->level == LEVEL_LEECH)
+    {
+	send_user (sender, MSG_SERVER_BROWSE_END, "%s 0", nick);
+	return;
+    }
+
     if (pkt)
     {
 	result = atoi (pkt);
@@ -349,6 +355,13 @@ HANDLER (browse_direct)
     if (!user)
     {
 	nosuchuser (con);
+	return;
+    }
+
+    if (sender->level == LEVEL_LEECH)
+    {
+	send_user(sender,MSG_SERVER_BROWSE_DIRECT_ERR,
+		  "%s \"permission denied: you are a leech\"", user->nick);
 	return;
     }
 
